package com.cbw.socket.udp;




import java.net.DatagramPacket;
import java.net.DatagramSocket;

public class Main {
    public static void main(String[] args) throws Exception {
        DatagramSocket datagramSocket = new DatagramSocket(8080);
        byte[] bytes = new byte[1024];
        DatagramPacket datagramPacket = new DatagramPacket(bytes,bytes.length);
        byte[] bys = datagramPacket.getData();
        int length = datagramPacket.getLength();
        String string = new String(bys,0,length);
    }
}
